From 955006bbb2a77d10ba27061ac6793ccae779d34d Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 14 Dec 2014 01:11:37 +0000 Subject: [PATCH] Fix brain-o from last gpx change. --- gpsbabel/gpx.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index 4d76be645..52f105050 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -1798,10 +1798,12 @@ gpx_write(void) * available use it, otherwise use the default. */ - if (gpx_version.isEmpty()) { - gpx_wversion = (char*)"1.0"; - } else { - gpx_wversion = xstrdup(gpx_version); + if (!gpx_wversion) { + if (gpx_version.isEmpty()) { + gpx_wversion = (char*)"1.0"; + } else { + gpx_wversion = xstrdup(gpx_version); + } } if (opt_humminbirdext || opt_garminext) { -- 2.30.2